import cv2 as cv

img = cv.imread('../test_datas/messi5.jpg')
if img is None:
    print("[ERROR] fail to read Image!!!")
    exit(0)

cv.imshow("pic", img)
cv.waitKey(0);
cv.destroyAllWindows()

# 取出ROI
ball = img[280:340, 330:390]
cv.imshow("pic", ball)
cv.waitKey(0);

# ROI 替换原图某个区域
img[273:333, 100:160] = ball
cv.imshow("pic", img)
cv.waitKey(0);

cv.destroyAllWindows()